import http from "../units/request";
//获取类别
export const getList = ()=>http.get("/category/getCategory",{
    params:{
        // category_id:20210827165510715 
    }
})

//删除item
export const delItemApi =(id)=>http.get("/category/delCategory",{
    params:{
        category_id:id
    }
}) 
//增加
export const additem = (categoryName,categoryImgurl)=>http.post("/category/addCategory",{
    categoryName,
    categoryImgurl
})
//头像上传
// export const uploadheadimgurl =(headimgurl)=>http.post("students/uploadStuAvatar",{
//     headimgurl
// }) 

//编辑item
export const editItem = (categoryName,category_id)=>http.post("/category/updateCategory",{
    categoryName,
    category_id
})
